import pygame
import sys

def init():
    # 初始化游戏引擎
    pygame.init()

    # 设定屏幕大小
    screen_witdh = 1600
    screen_height = 900
    screen = pygame.display.set_mode((screen_witdh, screen_height))

    # 设置标题
    pygame.display.set_caption("贪吃蛇")

def game_loop():
    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit()
                sys.exit()


if __name__ == '__main__':
    init()
    game_loop()